package org.glorylight.hacks.social.data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;

public class ScrapBookData implements Serializable, Comparable<ScrapBookData> {

	private static final long serialVersionUID = 1542878466918321281L;
	private String id;
	private String userId;
	private Date dateCreated;
	// private Date dateUpdated;
	private String picPath;
	private String title;
	private String desc;
	private boolean isShared;
	private String tag;

	List<ScrapBookCommentsData> comments = new ArrayList<ScrapBookCommentsData>();
	List<ScrapBookVotesData> voters = new ArrayList<ScrapBookVotesData>();

	public ScrapBookData() {
	}

	public ScrapBookData(String id, String userId, Date dateCreated,
			String picPath, String title, String desc, boolean isShared) {
		this.id = id;
		this.userId = userId;
		this.dateCreated = dateCreated;
		this.picPath = picPath;
		this.title = title;
		this.isShared = isShared;
		this.desc = desc;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getId() {
		return id;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public Date getDateCreated() {
		return dateCreated;
	}

	public void setDateCreated(Date dateCreated) {
		this.dateCreated = dateCreated;
	}

	// public Date getDateUpdated() {
	// return dateUpdated;
	// }
	//
	// public void setDateUpdated(Date dateUpdated) {
	// this.dateUpdated = dateUpdated;
	// }

	public String getPicPath() {
		return picPath;
	}

	public void setPicPath(String picPath) {
		this.picPath = picPath;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public boolean isShared() {
		return isShared;
	}

	public void setShared(boolean isShared) {
		this.isShared = isShared;
	}

	public String getTag() {
		return tag;
	}

	public void setTag(String tag) {
		this.tag = tag;
	}

	public List<ScrapBookCommentsData> getComments() {
		return comments;
	}

	public void setComments(List<ScrapBookCommentsData> comments) {
		this.comments = comments;
	}

	public List<ScrapBookVotesData> getVoters() {
		return voters;
	}

	public void setVoters(List<ScrapBookVotesData> voters) {
		this.voters = voters;
	}

	@Override
	public int compareTo(ScrapBookData other) {
		if (this.getDateCreated().after(other.getDateCreated()))
			return 1;
		return 0;
	}
}
